
layui.use(['form','jquery','table','layer'],function() {
    var form = layui.form
        , $ = layui.jquery
        , table = layui.table
        , layer = layui.layer;

    var courseId = parent.$('#parentId').val();
    $.ajax({
        url: '/course/getCourseById'
        ,data: {'courseId': courseId}
        ,dataType: 'json'
        ,success:function (data) {
            var course = data.data;
            var video = course.courseUrl;
            $('#courseName').val(course.courseName);
            $('#createDate').val(course.createDate);
            $('#createId').val(course.createId);
            $('#coursePrice').val(course.coursePrice);
            $('#name').val(course.name);
            $('#coursePrimary').val(course.coursePrimary);
            $('#likeNum').val(course.likeNum);
            $('#collectNum').val(course.collectNum);
            $('#lookNum').val(course.lookNum);
            $('#courseIntro').val(course.courseIntro);
            $('#courseInfo').val(course.courseInfo);
            $('#img').attr('src',course.url);
            $('#video').attr('src',video);
        }
    });




});